package personal.xjl._23java1studentdemo.mapper;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import personal.xjl._23java1studentdemo.model.Course;
import personal.xjl._23java1studentdemo.model.Score;


import java.util.List;

public interface ScoreMapper {
    @Select("select * from score where student_id=#{studentId}")
    @Results({
            @Result(column = "Course_id",property = "Course",javaType = Course.class,
                    one = @One(select = "personal.xjl._23java1studentdemo.mapper.CourseMapper.selectById"))
    })
    List<Score> selectByStudentId(int studentId);
}
